﻿@model Model1.Waarde

@{
    ViewBag.Title = "Create";
}

<h2>Activiteitenmeter toevoegen</h2>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Waarde</legend>

        @{
    int id = 0;
    foreach (Model1.Groep groep in ViewBag.Groepen)
    {
        <div style="border-style: solid; float: left; margin:10px; padding: 10px; width:600px;">
            <h3 style="margin:0 0 20px 0;">@groep.Naam</h3>
            @foreach (Model1.Specificatie item in groep.Specificaties)
            {
                <div class="editor-label" style="width: 250px; float: left;">

                    @item.Naam
                </div>
                <div class="editor-field" style="width: 315px; float: left;">
                    @{
                switch (Convert.ToInt32(item.Type))
                {
                    case 1:
                        @Html.Raw("Ja")
                        @Html.RadioButton("Naam[" + id + "]", "Ja")
                        @Html.Raw("Nee")
                        @Html.RadioButton("Naam[" + id + "]", "Nee", true)
                        @Html.ValidationMessageFor(model => model.Naam) break;
                    default:
                    @Html.Editor("Naam[" + id + "]")
                    @Html.ValidationMessageFor(model => model.Naam) break;
                }
                    }
                </div>
                id++;
            }
        </div>
    }
}        

        <p>
            <input type="submit" value="Create" style="width: 560px; float: left; " />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
